package com.shuzhi.dataway.util;

import com.alibaba.fastjson.JSON;

import java.util.Arrays;
import java.util.List;

/**
 * @author Siyuan.mlq
 * @version 1.0
 * @description 图表工具类
 * @since 2020/12/9
 */
public class ChartUtils {

  public static Line buildLine() {

    List<String> names = Arrays.asList("测试1", "测试2");
    List<Integer> values = Arrays.asList(111, 222);

    Line<List<String>, List<String>> data = new Line<>()
            .setNames(names)
            .setValues(values)
            .build();
    return data;
  }

  public static void main(String[] args) {
    System.out.println(JSON.toJSONString(buildLine()));
  }
}
